# a = 1
# print(a)
# a = "我又成字符串了啦"
# print(a)

#分支语句的迥异 和 "{} -> 缩进"
# val = input()
# if val==1 :
#     print("hello world\n")
#     print("hello world\n")
# elif val==2 :
#     print("hahahahha")
#     print("hahahahha")
#     print("hahahahha")
# else :
#     print("huangan")
# print("我在代码块之外,被遗弃啦")

#空语句替代 ;
# val = 7
# if val == 9:
#     pass
# else:
#     print("哈哈哈哈,pass就是个 ; h何必大张旗鼓!!!")

# count = 10
# while count!=0:
#     print("我蹦出来啦\n")
#     count = count-1

# a = 4564654.45456456423
# b = 45654.12231234654212312315642
# print(f'python精度真厉害🍭 结果{a+b}')

# a = 1
# b = 0
# print(f'a={a} , b={b}')
# a = a ^ b
# b = a ^ b
# a = a ^ b
# print(f'a={a} , b={b}')

# year = input("输入年份吧 :")
# if year%4==0 and year%100!=0 or year%400==0:
#     print("是闰年")
# else :
#     print("不是的")

# def is_leap(year):
#     if (year %4 ==0 and year %100 !=0) or (year %400 == 0):
#         return True
#     else :
#         return False
    

# year = input("输入年份吧 :")
# if is_leap(year):
#     print("yes")
# else :
#     print("no")


# def is_leap_year(year):
#     if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
#         return True
#     else:
#         return False

# year = input("输入年份")
# if is_leap_year(int(year)):
#     print(f"{year} 是闰年")
# else:
#     print(f"{year} 不是闰年")



# def celsius_to_fahrenheit(celsius):
#     return (celsius * 9/5) + 32

# def main():
#     try:
#         celsius = float(input("请输入摄氏温度: "))
#         fahrenheit = celsius_to_fahrenheit(celsius)
#         print(f"摄氏温度 {celsius}°C 转换为华氏温度是 {fahrenheit}°F")
#     except ValueError:
#         print("请输入一个有效的数字。")

# if __name__ == "__main__":
#     main()




#print("Hello, World!")

# # 提示用户输入两个数
# num1 = float(input("请输入第一个数（整数或浮点数）："))
# num2 = float(input("请输入第二个数（整数或浮点数）："))

# # 进行加、减、乘、除运算
# sum_result = num1 + num2  # 加法
# difference = num1 - num2  # 减法
# product = num1 * num2     # 乘法

# # 检查除数是否为0
# if num2 != 0:
#     quotient = num1 / num2  # 除法
# else:
#     quotient = "除数不能为0，无法计算除法结果"

# # 输出结果
# print(f"加法结果：{num1} + {num2} = {sum_result}")
# print(f"减法结果：{num1} - {num2} = {difference}")
# print(f"乘法结果：{num1} * {num2} = {product}")
# print(f"除法结果：{num1} / {num2} = {quotient}")


# # 提示用户输入两个数
# a = int(input("请输入第一个数："))
# b = int(input("请输入第二个数："))

# print("交换前：")
# print("a =", a)
# print("b =", b)

# # 使用加法和减法进行对调
# a = a + b
# b = a - b
# a = a - b

# print("交换后：")
# print("a =", a)
# print("b =", b)

# # 提示用户输入两个数
# a = int(input("请输入第一个数："))
# b = int(input("请输入第二个数："))

# print("交换前：")
# print("a =", a)
# print("b =", b)

# # 使用乘法和除法进行对调
# a = a * b
# b = a // b  # 使用整除避免浮点数结果
# a = a // b

# print("交换后：")
# print("a =", a)
# print("b =", b)




# def celsius_to_fahrenheit(celsius):
#     return (celsius * 9/5) + 32

# def main():
#     try:
#         celsius = float(input("请输入摄氏温度: "))
#         fahrenheit = celsius_to_fahrenheit(celsius)
#         print(f"摄氏温度 {celsius}°C 转换为华氏温度是 {fahrenheit}°F")
#     except ValueError:
#         print("请输入一个有效的数字。")

# if __name__ == "__main__":
#     main()



# def is_leap_year(year):
#     if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
#         return True
#     else:
#         return False

# year = input("输入年份")
# if is_leap_year(int(year)):
#     print(f"{year} 是闰年")
# else:
#     print(f"{year} 不是闰年")